<template>
	<view class="companylintr" style="width: 100%;padding-left: 15rpx; box-sizing: border-box;">

		<u-navbar :title="title" @rightClick="rightClick" :autoBack="true" :placeholder="true"
			:titleStyle="titleStyle ">
		</u-navbar>

		<rich-text type="text" :nodes="content"></rich-text>
		<view class="" style="height: 150rpx;"></view>
		<view v-if="title =='公司介绍'" class="" style="position: absolute;top: 80%;right: 0;">
			<image src="../../static/image/concat.png" style="width: 100rpx;height: 100rpx;" mode=""
				@click="handleConcat"></image>
		</view>
	</view>
</template>

<script>
	var graceRichText = require("../../static/richText.js");
	import {
		getConfig
	} from "@/api/api.js"
	export default {
		data() {
			return {
				moblie: "",
				title: "",
				content: "",
				titleStyle: {
					'font-weight': '600',
					// 'font-size': '35rpx',
				}
			}
		},
		onLoad(options) {
			let data = uni.getStorageSync("companyData")
			this.title = data.name
			this.content = graceRichText.format(data.content)
			this.handlegetConfig()
		},
		methods: {
			async handlegetConfig() {
				let res = await getConfig()
				this.moblie = res.data[3].value
			},

			handleConcat() {
				uni.makePhoneCall({
					phoneNumber: this.moblie,
					success() {
						console.log("拨打成功")
					},
					fail() {
						console.log("取消")
					},
				});
			},

			rightClick() {},
		}
	}
</script>

<style scoped lang="scss">
	.companylintr {
		width: 100%;
		min-height: 100%;
		background-color: #ffffff;
	}
</style>